package org.journal.dao;

import java.io.Serializable;
import java.util.List;

import org.hibernate.Query;

public interface GenericDAO<T, ID extends Serializable> {

	public T getEntityById(Class<T> type, Serializable id);

	public Serializable save(T entity);

	public boolean remove(T entity);

	public List<T> findAll(Class<T> clazz);

	public List<T> search(Query query);

	public T searchUnique(Query query);

	public void merge(T entity);

	public void update(T entity);

}
